// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "TickTestActor.h"
#include "MyBlueprintAsyncActionBase.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FMyAsyncNodeResult, int32, Result);
/**
 * 
 */
UCLASS()
class ASYNC_API UMyBlueprintAsyncActionBase : public UBlueprintAsyncActionBase
{
	GENERATED_BODY()

	UPROPERTY(BlueprintAssignable)
	FMyAsyncNodeResult OnSuccess;

	UPROPERTY(BlueprintAssignable)
	FMyAsyncNodeResult OnFail;
	
	FTimerHandle TimerHandle;

	UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"))
	static UMyBlueprintAsyncActionBase* WaitTickTestActorCounter(UObject* WorldContextObject, ATickTestActor* Actor, int32 TargetCounter);
};
